<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>忘记密码</title>
<script language="javascript" src="JS/jquery-3.1.1.min.js"></script>
<script language="javascript">
function refresh(obj){
	obj.src="/baike/sdubaike/getCheckCodeImage?"+Math.random();
}
$(document).ready(function(){
	$("#submit").bind("click",function(){
	alert("发送请求");
		$.post("/baike/sdubaike/forgetPassword",{username:$("#username").val(),email:$("#email").val(),checkCode:$("#checkCode").val()},
				function callback(data){   
				
				        		alert(data);
		   }); 
		});
});
</script>
</head>
<body>
	<form>
	用户名：
	<input type="text" name="username" id="username">
	<br>
	邮箱：
	<input type="text" id="email">
	<br>
	验证码：
	<input type="text" id="checkCode">
    <img id="checkCode" title="点击更换" onclick="javascript:refresh(this);" src="/baike/sdubaike/getCheckCodeImage">
	<input type="button" id="submit" value="提交">
	</form>
	<form action="login.jsp">
	<input type="submit" value="返回">
	</form>
</body>
</html>